Is there a way to make the flash[:notice] appear above, or before, the flash[:error] ?
Posted
by GoodGets
on Stack Overflow
See other posts from Stack Overflow
or by GoodGets
Published on 2010-04-05T05:17:58Z
Indexed on
2010/04/05
5:23 UTC
Read the original article
Hit count: 285
ruby-on-rails
So, I'd like to be able to display both a flash[:notice] and a flash[:error] on the same action, but I'd like for the :notice to always be displayed above (or before) the error. Is there a way to do this?
In my controller, I thought I could just code the flash[:error] before the flash[:notice], so that rails will display it correctly, and it does a vast majority of the time. But every now and then they are randomly switched, and I can't seem to figure out why. So, how can I ensure that a flash[:notice] is always displayed above an :error ?
© Stack Overflow or respective owner